<?php
$song = new Song();
?>

<form id="formAddSong" name="formAddSong" action="" method="post" enctype="multipart/form-data">		
	<table cellspacing="4">					
		<tr valign="top" style="line-height: 20px"> 
			<td align="right"><b>Title</b></td>
			<td><input name="txtTitle" type="text" style="width: 720px" onblur="checkTitle()" value="<?php echo $song->getTitle(); ?>"></input></td>
			<td><b style="color:#8C0000">*</b></td>
		</tr>		
		<tr valign="top">
			<td align="right"><b>Intro</b></td>
			<td>
				<textarea name="txtIntro" style="width: 720px; height: 50px" onblur="" onkeyup="" onkeydown=""><?php echo $song->getIntro(); ?></textarea><br />				
			</td>
			<td><b style="color:#8C0000">*</b></td>
		</tr>		
		<tr valign="top">
			<td align="right"><b>Lyrics et Chords</b></td>
			<td>
				<textarea name="txtLyricsChords" style="width: 720px; height: 300px" onblur="" onkeyup="" onkeydown="checkcount()"><?php echo $song->getLyricsChords(); ?></textarea><br />				
			</td>
			<td><b style="color:#8C0000">*</b></td>
		</tr>
		<tr valign="top">
			<td align="right"><b>Artist</b></td>
			<td><input id="txtArtist" name="txtArtist" type="text" style="width: 720px"  onblur="checkArtist()" value="<?php echo $song->getArtist()->getName(); ?>"/><br></td>
			<td>&nbsp;</td>
		</tr>
		<tr valign="top">
			<td align="right"><b>Things remembered</b></td>
			<td>
				<textarea name="txtThingsRemembered" style="width: 720px; height: 72px" onblur="" onkeyup="" onkeydown=""><?php echo $song->getThingsRemembered(); ?></textarea><br />				
			</td>
			<td>&nbsp;</td>
		</tr>
		<tr valign="top" style="line-height: 20px"> 
			<td align="right"><b>Tags</b></td>
			<td><input name="txtTags" type="text" style="width: 720px" onblur="checkTags()" value="<?php echo $song->getTags(); ?>"></input></td>
			<td>&nbsp;</td>
		</tr>
		<tr valign="top">
			<td align="right"><b>Photo</b></td>
			<td>
				<input type="file" id="filePhoto" size="55" name="filePhoto" onblur="checkPhoto()"/>
			</td>
			<td>&nbsp;</td>			
		</tr>		
	</table>
	
	<hr width="90%">	
	<div align="center">
		<input type="submit" name = "btnAdd" value="Add" onClick="addSong()"/>
		<input type="button" name = "btnCancel" value="Cancel" onClick="cancel()"/>
	</div>
</form>	
